-- GENERATED SPELL FOR [Skyguard Ranger] --


function spell0_23242(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(30614,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23242', 3000, 1)
end

function spell1_23242(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(18651,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23242', 606, 1)
end

function spell2_23242(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_23242', 573, 1)
end

function spell3_23242(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_23242', 2000, 1)
end

function Sorts_23242(pUnit, Event)
local choix_sorts_23242 = math.random(0, 3)
if choix_sorts_23242 == 0 then
pUnit:RegisterEvent('spell0_23242', 1, 1)
end
if choix_sorts_23242 == 1 then
pUnit:RegisterEvent('spell1_23242', 1, 1)
end
if choix_sorts_23242 == 2 then
pUnit:RegisterEvent('spell2_23242', 1, 1)
end
if choix_sorts_23242 == 3 then
pUnit:RegisterEvent('spell3_23242', 1, 1)
end
end

function mob23242_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23242', math.random(1500, 3000), 1)
end

function mob23242_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23242_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23242_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23242, 1, 'mob23242_Action')
RegisterUnitEvent(23242, 2, 'mob23242_Leave')
RegisterUnitEvent(23242, 3, 'mob23242_Kill')
RegisterUnitEvent(23242, 4, 'mob23242_Die')
